/// total : 4
/// rows : [{"id":472008569941274624,"resourceName":"视频资源1","type":1,"price":0,"useCount":84,"buyCount":0,"isBuy":0,"createTime":1637639451000},{"id":472466685097897984,"resourceName":"PPT资源","type":1,"price":0,"useCount":37,"buyCount":0,"isBuy":0,"createTime":1637748472000},{"id":472467047804530688,"resourceName":"音频资源","type":1,"price":0,"useCount":52,"buyCount":0,"isBuy":0,"createTime":1637748472000},{"id":472467444384362496,"resourceName":"文档资源","type":1,"price":0,"useCount":20,"buyCount":0,"isBuy":0,"createTime":1637748472000}]
/// code : 200
/// msg : "查询成功"

class ResourceDto {
  ResourceDto({
    int? total,
    List<Rows>? rows,
    int? code,
    String? msg,
  }) {
    _total = total;
    _rows = rows;
    _code = code;
    _msg = msg;
  }

  ResourceDto.fromJson(dynamic json) {
    _total = json['total'];
    if (json['rows'] != null) {
      _rows = [];
      json['rows'].forEach((v) {
        _rows?.add(Rows.fromJson(v));
      });
    }
    _code = json['code'];
    _msg = json['msg'];
  }
  int? _total;
  List<Rows>? _rows;
  int? _code;
  String? _msg;

  int? get total => _total;
  List<Rows>? get rows => _rows;
  int? get code => _code;
  String? get msg => _msg;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['total'] = _total;
    if (_rows != null) {
      map['rows'] = _rows?.map((v) => v.toJson()).toList();
    }
    map['code'] = _code;
    map['msg'] = _msg;
    return map;
  }
}

/// id : 472008569941274624
/// resourceName : "视频资源1"
/// type : 1
/// price : 0
/// useCount : 84
/// buyCount : 0
/// isBuy : 0
/// createTime : 1637639451000

class Rows {
  Rows({
    String? id,
    String? resourceName,
    int? type,
    int? price,
    int? useCount,
    int? buyCount,
    int? isBuy,
    int? createTime,
  }) {
    _id = id;
    _resourceName = resourceName;
    _type = type;
    _price = price;
    _useCount = useCount;
    _buyCount = buyCount;
    _isBuy = isBuy;
    _createTime = createTime;
  }

  Rows.fromJson(dynamic json) {
    _id = json['id'];
    _resourceName = json['resourceName'];
    _type = json['type'];
    _price = json['price'];
    _useCount = json['useCount'];
    _buyCount = json['buyCount'];
    _isBuy = json['isBuy'];
    _createTime = json['createTime'];
  }
  String? _id;
  String? _resourceName;
  int? _type;
  int? _price;
  int? _useCount;
  int? _buyCount;
  int? _isBuy;
  int? _createTime;

  String? get id => _id;
  String? get resourceName => _resourceName;
  int? get type => _type;
  int? get price => _price;
  int? get useCount => _useCount;
  int? get buyCount => _buyCount;
  int? get isBuy => _isBuy;
  int? get createTime => _createTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['resourceName'] = _resourceName;
    map['type'] = _type;
    map['price'] = _price;
    map['useCount'] = _useCount;
    map['buyCount'] = _buyCount;
    map['isBuy'] = _isBuy;
    map['createTime'] = _createTime;
    return map;
  }
}
